package com.tingyuge.base.structrue.array;

/**
 * @Created by xiaodao
 */
public class Main {
    public static void main(String[] args) {
        Array<Integer> arr =  new Array();

        for (int i = 0; i <10 ; i++) {
            arr.addLast(i);
        }
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);
        arr.addLast(20);

        System.out.println(arr);

        arr.removeLast();
        System.out.println(arr);
        arr.addFirst(90909);
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        arr.removeLast();
        System.out.println(arr);

    }
}
